package leetcode_501_600;

import java.util.Arrays;

public class LeeCode_561 {
    public static void main(String[] args) {

    }
    private static int arrayPairSum(int[] nums) {
        int n = nums.length;
        Arrays.sort(nums);
        int ans = 0;
        for (int i = 0; i < n; i += 2) {
            ans += nums[i];
        }
        return ans;
    }
}
